/**
 * @param {string[]} words
 * @param {character} separator
 * @return {string[]}
 */
var splitWordsBySeparator = function(words, separator) {
    let ans = []
    for(let i = 0; i < words.length; i++) {
        let s = ""
        for(let j = 0; j < words[i].length; j++) {
            if(words[i].charAt(j) !== separator) {
                s += words[i].charAt(j)
            } else {
                if(s !== "") {
                    ans.push(s)
                }
                s = ""
            }
        }
        if(s !== "")  ans.push(s)
    }
    return ans
};